<{include file ="header.tpl"}>
<{include file ="navibar.tpl"}>
<{include file ="sidebar.tpl"}>
<!-- START 以上内容不需更改，保证该TPL页内的标签匹配即可 -->

<{$osadmin_action_alert}>
<{$osadmin_quick_note}>
<div class="well">

    <ul class="nav nav-tabs">
      <li class="active"><a href="#home" data-toggle="tab">请填写资料</a></li>
    </ul>	
		  <div class="tab-pane active in" id="home">

           <form id="tab" method="post" action="">
                <label>卡号</label>
                <input type="text" name="sim" value="<{$module.card_no}>" class="input-xlarge" required="true" autofocus="true" >
                <!-- <label>手机号</label>
                <input type="text" name="phone" value="<{$module.phone}>" class="input-xlarge" required="true" autofocus="true" > -->
                <label>开通日期</label>
                <input type="date" name="open_time" value="<{$module.open_time}>" class="input-xlarge" required="true" autofocus="true" >
                <div class="btn-toolbar">
                    <button type="submit" class="btn btn-primary"><strong>提交</strong></button>
                </div>
           </form>
        </div>
    </div>
</div>
<div id="container" style="display:none"></div>
<script>

$(document).ready(function() {
    $('.displayImg').each(function(i,item){
        uploadInit($(item),null,$(item),$(item).next());
    });
});

function uploadInit(img,progressNode,showNode,inputNode){
    var uploader = new plupload.Uploader({
        runtimes : 'html5,flash,silverlight,html4',
        multi_selection : false,
        browse_button : img.attr("id"), // you can pass an id...
        container: document.getElementById('container'), // ... or DOM Element itself
        url : '../web/ajax/upload.php',
        flash_swf_url : '../js/Moxie.swf',
        silverlight_xap_url : '../js/Moxie.xap',
        
        filters : {
            max_file_size : '10mb',
            mime_types: [
                {title : "Image files", extensions : "jpg,gif,png"},
                {title : "Zip files", extensions : "zip"}
            ]
        },

        init: {
            PostInit: function() {
                // document.getElementById('filelist').innerHTML = '';

                // document.getElementById('uploadfiles').onclick = function() {
                    
                    // return false;
                // };
            },
            FilesAdded: function(up, files) {
                plupload.each(files, function(file) {
                    uploader.start();
                    // $("#submit").attr("disabled",true); 
                });
            },

            UploadProgress: function(up, file) {
                // progressNode.css({"width":file.percent + "%"});
            },

            FileUploaded: function(up,file,result){
                var res =  JSON.parse(result.response);
                // valueNode.val(res.msg);
                showNode.attr("src",res.msg);
                inputNode.val(res.msg);
            },
            Error: function(up, err) {
                // progressNode.removeClass("hide")
                // progressNode.html("上传失败");
            }
        }
    });

    uploader.init();
}
</script>
<!-- END 以下内容不需更改，请保证该TPL页内的标签匹配即可 -->
<{include file="footer.tpl" }>